<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <input id="input" type="text" />
    <div id="div">hello</div>
    <script>
      const input = document.getElementById("input");
      const div = document.getElementById("div");

      // 普通对象
      Element.prototype.username = "jack";
      Element.prototype.say = function () {
        console.log(this.username);
      };
      console.log(div.username);
      console.log(input.username);
      input.say();
      div.say();
    </script>
  </body>
</html>
